package com.dubbo.consumer;

import com.dubbo.provider.IDubboProvider;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * ${DESCRIPTION}.
 * User: wwchen
 * DateTime: 2017-11-2017/11/22 23:11
 */
@Controller
@RequestMapping(value="/customerTest")
public class CustomerAction {

    @Resource(name="demoService")
    private IDubboProvider demoService;

    @RequestMapping(value="/test.do")
    public ModelAndView test(HttpServletRequest request, HttpServletResponse response){
        System.out.println("成功");
        String result = demoService.sayHello("world");
        System.out.println(result);
        return null;
    }

}
